(function() {
  var MyListItemView, View, mediator,
    __hasProp = {}.hasOwnProperty,
    __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; };

  View = require('./../view');

  mediator = require('mediator');

  module.exports = MyListItemView = (function(_super) {

    __extends(MyListItemView, _super);

    MyListItemView.name = 'MyListItemView';

    function MyListItemView() {
      return MyListItemView.__super__.constructor.apply(this, arguments);
    }

    MyListItemView.prototype.tagName = 'li';

    MyListItemView.prototype.itemNamePrefix = null;

    MyListItemView.prototype.SetSelectedItemChangedEventName = function(name) {
      var itemName,
        _this = this;
      console.debug('SetSelectedItemChangedEventName', name);
      itemName = this.itemNamePrefix + this.model.id;
      return this.delegate('click', function() {
        return mediator.publish(name, _this.model);
      });
    };

    MyListItemView.prototype.initialize = function(itemNamePrefix) {
      console.debug('MyListItemView#initialize', itemNamePrefix);
      this.itemNamePrefix = itemNamePrefix;
      return MyListItemView.__super__.initialize.apply(this, arguments);
    };

    MyListItemView.prototype.render = function() {
      console.debug('MyListItemView#render', this, this.$el);
      return MyListItemView.__super__.render.apply(this, arguments);
    };

    MyListItemView.prototype.afterRender = function() {
      console.debug('MyListItemView#afterRender');
      return MyListItemView.__super__.afterRender.apply(this, arguments);
    };

    return MyListItemView;

  })(View);

}).call(this);
